<?php
class User extends AppModel {
	var $name = 'User';
	var $displayField = 'username';
	var $validate = array(
		'name' => array(
			'notempty' => array(
				'rule' => array('notempty'),
				'message' => 'Please enter your name list!',
			),
		),
		'email' => array(
			'email' => array(
				'rule' => array('email'),
				'message' => 'Email format is incorrect!',
				//'allowEmpty' => false,
				'required' => true,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
		),
	);	
	var $belongsTo = array(
 	'Group' => array(
		'className' => 'Group',
		'foreignKey' => 'groups_id',
		'conditions' => '',
		'fields' => '',
		'order' => ''
	)
	);
 }
?>